<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/bowl.css">
    <link rel="stylesheet" href="./font_2736025_0awequdjrn9l/iconfont.css">
</head>
<body>
    <div class="one-wai">
        <div class="one xin">
            <div class="one-a">
                <a href="">Hi，欢迎来到洋码头！</a>
                <a href="" target="_blank">我是买手</a>
            </div>
            <div class="one-b">
                <a href="">不候时光 <i class="iconfont">&#xe604;</i></a>
                <a href="">购物车</a>
                <a href="">我的订单</a>
                <a href="">购物中心</a>
                <a href="">规则&公告</a>
            </div>
        </div>
    </div>
    <div class="ce">
        <a href="">
            <div class="ce-a">
                <i class="iconfont">&#xe6c2;</i>
            </div>
        </a>
        <a href="">
            <div class="ce-b">
                <i class="iconfont">&#xe697;</i>
                <p class="ce-b-a">
                    购<br>
                    物<br>
                    车
                </p>
            </div>
        </a>
        <a href="">
            <div class="ce-c">
                <i class="iconfont">&#xe623;</i>
                <div class="ce-c-a">
                    <img src="https://pic1.ymatou.com/G02/M02/FB/5C/CgvUBFht9-CADvH8AAAW6VtgvkI439_62_63_w_o.png" alt="">
                    <br>
                    <span>
                        下载APP领取<br>
                        260元新人礼包
                    </span>
                </div>
            </div>
        </a>
        <a href="">
            <div class="ce-d">
                <i class="iconfont">&#xe6dd;</i>
                <p>TOP</p>
            </div>
        </a>
    </div>
    <div class="two-wai">
        <div class="two xin">
            <div class="two-a">
                
                <div class="two-a-b">
                    <a href="">
                        <img src="https://s2.ymatou.com/home/4aa0780b5ffeee46a01f132052fdb71a.png
                        " alt="">
                    </a>
                    <form action="" class="two-a-b-a">
                        <input type="text" id="a" class="two-a-b-b" placeholder="锅"><label for="a"><input type="submit" class="two-a-b-a-a" value="" ></label>
                    </form>
                </div>
            </div>
            <div class="two-b">
                <img src="	https://s2.ymatou.com/home/e99aa3f029f2ae1173fabf6e9edf6c8a.png
                " alt="">
            </div>
        </div>
    </div>
    <div class="three-wai">
        <div class="three xin">
            <div class="three-a">
                <a href="./yangmatou.html">首页</a>
                <a href="">今日限时抢</a>
                <a href="">洋货集</a>
                <li class="three-li">
                    <a href="" class="three-a-d">分类
                        <i class="iconfont">&#xe605;</i>
                        <i class="iconfont">&#xe6dd;</i>
                        <div class="three-a-d-b">

                        </div>
                    </a>
                        <div class="three-a-d-a">
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-b">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-b">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-a">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                            <a href="" class="three-a-d-a-a three-border-a three-border-b">
                                <div class="three-erji-a">
                                    <span class="erji-a-b">护肤</span>
                                    <span class="erji-a-a">></span>
                                    <p>
                                        <span class="erji-b-a">面膜</span>
                                        <span class="erji-b-a">水乳</span>
                                        <span class="erji-b-a">防晒隔离</span>
                                    </p>
                                </div>
                                <div class="three-erji-b">
                                    <img src="https://pic1.ymatou.com/G02/M0B/0B/61/CgvUBFlE_l-AFtC7AAMyS71u0oU066_1_1_o.gif
                                    " alt="">
                                </div>
                            </a>
                        </div>
                </li>
            </div>
        </div>
    </div>
    <div class="four xin">
        <div class="four-a">
            <span>全部结果 ></span> <span class="four-a-a">"碗"</span>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 品牌</div>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
            <a href="" class="four-b-b">B.Box</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 清洁用品</div>
            <a href="" class="four-b-b">家庭清洁</a>
            <a href="" class="four-b-b">家庭清洁</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 哺喂用具</div>
            <a href="" class="four-b-b">家庭清洁</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 厨房用具</div>
            <a href="" class="four-b-b">家庭清洁</a>
            <a href="" class="four-b-b">家庭清洁</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 食品饮料</div>
            <a href="" class="four-b-b">家庭清洁</a>
            <a href="" class="four-b-b">家庭清洁</a>
            <a href="" class="four-b-b">家庭清洁</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 食品饮料</div>
            <a href="" class="four-b-b">家庭清洁</a>
            <a href="" class="four-b-b">家庭清洁</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 厨房用具</div>
            <a href="" class="four-b-b">家庭清洁</a>
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 价格</div>
            <a href="" class="four-b-b">￥ 20-99</a>
            <a href="" class="four-b-b">￥ 100-199</a>
            <a href="" class="four-b-b">￥ 200-299</a>
            <span class="four-b-b">|</span>
            <input type="text"  style="margin-left: 15px;margin-right: 15px; width: 120px;height: 30px;border-radius: 5px;border: 1px solid #ccc;color: #666;" value="￥">
            <input type="text"  style="margin-left: 15px;margin-right: 15px; width: 120px;height: 30px;border-radius: 5px;border: 1px solid #ccc;color: #666;" value="￥">
        </div>
        <div class="four-b">
            <div class="four-b-a"><i class="iconfont">&#xe652;</i>&nbsp;&nbsp; 物流方式</div>
            <span class="four-b-b"><input type="checkbox"  class="four-b-b-a"> <span>保税发货</span></span>
        </div>
        <div class="four-c">
            <div class="four-b-a">&nbsp;&nbsp; 综合排序</div>
            <span class="four-b-b"><input type="checkbox"  class="four-b-b-a"> <span>正在促销</span></span>
            <span class="four-b-b"><input type="checkbox"  class="four-b-b-a"> <span>包邮</span></span>
            <span class="four-b-b"><input type="checkbox"  class="four-b-b-a"> <span>七天无理由发货</span></span>
            <span class="four-b-b"><input type="checkbox"  class="four-b-b-a"> <span>本土发货</span></span>
        </div>
    </div>
    <div class="eight xin" id="eightid">
        
    </div>

    
    <div class="sevenssss xin">
        <a href="" class="sevenssss-a">
            <i class="iconfont">&#xe652;</i> &nbsp;猜你喜欢
        </a>
    </div>
    <div class="ten xin">

    </div>
    <div class="seven-wai">
        <div class="seven xin">
            <a href="">
                <img src="./images/3.png" class="seven-a" alt="">
            </a>
            <div class="seven-b">
                <div class="seven-b-a">
                    <p class="seven-b-a-a">
                        购物指南
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                </div>
                <div class="seven-b-a">
                    <p class="seven-b-a-a">
                        购物指南
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                </div>
                <div class="seven-b-a">
                    <p class="seven-b-a-a">
                        购物指南
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                </div>
                <div class="seven-b-a">
                    <p class="seven-b-a-a">
                        购物指南
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                    <p class="seven-b-a-b">
                        <a href="">注册与登录</a>
                    </p>
                </div>
                <div class="seven-b-b">
                    <p class="seven-b-a-a">
                        官方微信
                    </p>
                    <div class="seven-b-b-b">
                        <img src="https://static.ymatou.com/content/images/weixin2d-new.png" alt="">
                    </div>
                    <a href="" class="seven-b-b-c">
                        关注微博
                        <span class="seven-b-b-c-a"></span>
                    </a>
                </div>
            </div>
            <div class="seven-two">
                <a href="">
                    关于码头
                </a>
                <a href="">
                    关于码头
                </a>
                <a href="">
                    关于码头
                </a>
                <a href="">
                    关于码头
                </a>
                <a href="">
                    关于码头
                </a>
                <a href="">
                    关于码头
                </a>
                <a href="" class="seven-two-a">
                    关于码头
                </a>
            </div>
            <div class="seven-three">
                <a href="" class="seven-three-a">
                    55bbs我爱购物网
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    仙逆
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    仙逆
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    莽荒纪
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    莽荒纪
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    莽荒纪
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    莽荒纪
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    起点中文网
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    起点中文网
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    起点中文网
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    起点中文网
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    起点中文网
                </a>
                <a href="" class="seven-three-a">
                    笆篱网
                </a>
                <a href="" class="seven-three-a">
                    起点中文网
                </a>
                <a href="" class="seven-three-a" id="seven-three-a-a">
                    更多 》
                </a>
            </div>
            <div class="seven-four">
                <a href="" class="seven-four-a">
                    <img src="./images/4.png" alt="">
                </a>
                <a href="" class="seven-four-a">
                    <img src="./images/5.png" alt="">
                </a>
                <a href="" class="seven-four-a">
                    <img src="./images/6.png" alt="">
                </a>
                <a href="" class="seven-four-a">
                    <img src="./images/7.png" alt="">
                </a>
            </div>
            <div class="seven-five">
                    <p class="seven-five-a">
                        © 2009－2020 ymatou.com, All rights reserved 增值电信业务经营许可证：合字B2-20200181 
                    </p>
                <a href="">
                    <p class="seven-five-a seven-five-b">
                        上海洋码头网络技术有限公司 版权所有 备案号（ 沪ICP备11050082号-7 ）
                    </p>
                    <p class="seven-five-a seven-five-b">
                        上海市静安区江场三路93号12层 
                    </p>
                </a>
            </div>
            <div class="seven-six">
                <span class="seven-six-a">
                    <a href="" class="seven-six-b">
                        沪公网安备 31010802001410号
                    </a>
                </span>
                <span class="seven-six-c">|</span>
                <span class="seven-six-a">
                    违法不良信息举报电话：021-80185223
                </span>
                <span class="seven-six-c">|</span>
                <span class="seven-six-a">
                    <a href="" class="seven-six-b">
                        上海市互联网举报中心
                    </a>
                </span>
                <span class="seven-six-c">|</span>
                <span class="seven-six-a">
                    <a href="" class="seven-six-b">
                        网上有害信息举报专区
                    </a>
                </span>
                <span class="seven-six-c">|</span>
                <span class="seven-six-a">
                    <a href="" class="seven-six-b">
                        平台资质
                    </a>
                </span>
                <span class="seven-six-c">|</span>
                <span class="seven-six-a">
                    <a href="" class="seven-six-b">
                        平台声明
                    </a>
                </span>
            </div>
        </div>
    </div>
</body>
<script src="./js/ajax.js"></script>
<script src="./js/cookie.js"></script>
<script src="./data/require.js" data-main="./js/smodules"></script>
<script>
    class List{
        constructor(){
            this.eight = document.getElementById("eightid");
            this.url = "http://localhost:3000/api";
            this.load();
            this.addEvent();
        }
        addEvent(){
            const that = this;
            this.eight.addEventListener("click",function(eve){
                const e = eve ? eve : window.event;
                const target = e.target ? e.target : e.scrElement;
                that.id = target.getAttribute("index")
                // that.setLocal();
            })
        }
        setLocal(){
            // 假设数据形式：[{id:"",num:1},{id:"",num:1},...]
            // 先读取本地存储中的数据
            this.goods = getCookie("goods") ? JSON.parse(getCookie("goods")) : [];
            // 判断是否是第一次加入购物车
            // if(this.goods.length < 1){
            //     // 是第一次
            //     this.goods.push({
            //         id: this.id,
            //         num: 1,
            //         flag: 0
            //     })
            // }else{
            //     // 不是第一次，判断本次商品是否是新商品
            //     let i=0;
            //     const flag = this.goods.some((val,idx)=>{
            //         i = idx;
            //         return val.id === this.id;
            //     })

            //        // 这里是用来跳转到详情页的，不用增加num
            //     if(flag){
            //         // 不是，修改老数据的数量
            //         // this.goods[i].num++;
            //     }else{
            //         // 是，在原来的基础上增加数据
            //         this.goods.push({
            //             id: this.id,
            //             num: 1,
            //             flag: 0
            //         })
            //     }
            // }
            // 最后将处理好了的数组，存储的本地存储
            // setCookie("goods", JSON.stringify(this.goods));
        }
        load(){
            // 1. 发起请求，请求商品数据
            ajax({
                url: this.url,
                success:res=>{
                    // console.log(res);
                    res = JSON.parse(res);
                    if(res.code === 1){
                        // 2. 解析商品数据
                        this.data = res.data;
                        // 3. 根据商品数据，渲染页面结构
                        this.render();
                    }
                },
                data:{
                    type:"getGoods"
                }
            })
        }
        render(){
            let str = "";
            this.data.forEach(val=>{
                str += `<div class="eight-a">
            <a href="http://localhost:3000/detalis.html?${val.id}">
                <img src="${val.img}" index="${val.id}" class="eight-b" alt="">
            </a>
            <a href="http://localhost:3000/detalis.html" class="eight-c">
               ${val.name}
            </a>
            <p class="eight-d">￥${val.price}</p>
        </div>`
            })
            this.eight.innerHTML = str;
        }
    }
    new List();




    // const eight = document.querySelector(".eight")
    // // console.log(eight)
    // var str = "";
    // for(var i = 0;i < 30;i++){
        
    //     str += '<div class="eight-a"><a href=""><img src="http://pic1.ymatou.com/G02/shangou/M00/92/DD/CgzUC11Q3paAMrKqAALYbVscUeI763_104_125_n_w_lb.jpg" class="eight-b" alt=""></a><a href="" class="eight-c">德国原装Balea芭乐雅玻尿酸紧致提拉保湿浓缩精华7ml安瓶保湿补水</a><p class="eight-d">￥39.00</p></div>';
    // }
    // // console.log(str)
    // eight.innerHTML += str;
    const nineooo = document.querySelector(".ten")
    // console.log(eight)
    var str = "";
    for(var i = 0;i < 10;i++){
        
        str += '<div class="eightaaa-a"><a href=""><img src="http://pic1.ymatou.com/G02/shangou/M00/92/DD/CgzUC11Q3paAMrKqAALYbVscUeI763_104_125_n_w_lb.jpg" class="eightaaa-b" alt=""></a><a href="" class="eightaaa-c">德国原装Balea芭乐雅玻尿酸紧致提拉保湿浓缩精华7ml安瓶保湿补水</a><p class="eightaaa-d">￥39.00</p></div>';
    }
    // console.log(str)
    nineooo.innerHTML += str;

</script>
</html>